<html> 
<head> 
<meta charset="utf-8">
<script type="text/javascript"> 
function show_coords(event) 
{ 
x=event.clientX 
y=event.clientY 
alert("X 坐标： " + x + ", Y 坐标： " + y) 
} 
</script> 
</head> 

<body onmousedown="show_coords(event)"> 

<p>在此文档中按下你鼠标的左键看看！</p> 

</body> 
</html> 